<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<script type="text/javascript">
	$(document).ready(function(){
		$("#listBtn").click(function(){
			if(confirm("문의글 목록으로 돌아 가시겠습니까?")){
				location.href="getQuestionBoardList.do?pageNo=${requestScope.pageNo}";
			}else{
				return;
			}
		});
		$("#replyBtn").click(function(){
			if($("#title").val()==""){
				alert("제목을 입력하세요!");
				$("#title").focus();
				return;
			}else if($("#content").val()==""){
				alert("내용을 입력하세요!");
				$("#content").focus();
				return;
			}else{
				$("#replyForm").submit();
			}
		});
	});
</script>

<form id="replyForm" action="replyQuestion.do" method="post">
 <table width="300px">
 	 <thead align="left">
	 <tr>
		<td>작성자</td>
		<td><input type="text" name="id" id="id" readonly value="${sessionScope.cvo.id }"></td>
	 </tr>
	 <tr>
		<td>답글 제목</td>
		<td><input type="text" name="title" id="title" value="RE: ${requestScope.qvo.title }"></td>
	 </tr>
	 </thead>
	 <tbody align="left">
	 <tr>
		<td colspan=2>답글 내용
		<br>
		<textarea cols="32" rows="10" name="content" id="content">
${requestScope.qvo.content }
=====답변=====
</textarea>
		</td>
	 </tr>
	 </tbody>
	 <tfoot align="left">
	 <tr>
	 	<td  colspan=2 >
	 		<input type="button" id=listBtn value="목록 보기">
	 		<input type="button" id="replyBtn" value="답글 쓰기">
	 		<input type="reset" value="복원 하기"> 	 		
	 	</td>
	 </tr>
	 </tfoot>
 </table>
 	<input type="hidden" name="pageNo" value="${requestScope.pageNo}">
 	<input type="hidden" name="no" value="${requestScope.qvo.no }">
	<input type="hidden" name="ref" value="${requestScope.qvo.ref }">
	<input type="hidden" name="restep" value="${requestScope.qvo.restep }">
	<input type="hidden" name="relevel" value="${requestScope.qvo.relevel }">
 </form>
